package com.mdd.admin.controller;

import com.mdd.admin.service.ILegalSalesmanClockOnService;
import com.mdd.admin.validate.LegalSalesmanClockOnSearchValidate;
import com.mdd.admin.validate.commons.PageValidate;
import com.mdd.admin.vo.LegalSalesmanClockOnListedVo;
import com.mdd.common.core.AjaxResult;
import com.mdd.common.core.PageResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("api/clockOn")
@Api(tags = "销售打卡记录管理")
public class LegalSalesmanClockOnController {

    @Resource
    ILegalSalesmanClockOnService iLegalSalesmanClockOnService;

    @GetMapping("/list")
    @ApiOperation(value="销售打卡记录列表")
    public AjaxResult<PageResult<LegalSalesmanClockOnListedVo>> list(@Validated PageValidate pageValidate,
                                                     @Validated LegalSalesmanClockOnSearchValidate searchValidate) {
        PageResult<LegalSalesmanClockOnListedVo> list = iLegalSalesmanClockOnService.list(pageValidate, searchValidate);
        return AjaxResult.success(list);
    }


}
